<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/tools/commonTag.jsp" %>
<div class="pageArea" id="pageArea">
第<span class="pageNumber" id="pageNumber"><font color=red>${pageView.currentPage}</font>/${pageView.totalPage}</span>页

<c:choose>
	<c:when test="${empty pageView.currentPage || pageView.currentPage == 1}">
		<a title="首页" class="pageFirstDisable" id="pageFirst" href="javascript:;"></a>
		<a title="上一页" class="pagePreviousDisable" id="pagePrevious" href="javascript:;"></a>
	</c:when>
	<c:otherwise>
		<a title="首页" class="pageFirst" id="pageFirst" href="${path}/${param.urladdr}?pageView.currentPage=1"></a>
		<a title="上一页" class="pagePrevious" id="pagePrevious" href="${path}/${param.urladdr}?pageView.currentPage=${pageView.currentPage eq 1?1:pageView.currentPage-1}"></a>
	</c:otherwise>
</c:choose>


<span class="page_Index">
	<c:forEach var="pageIndex" begin="${pageView.pageIndex.startindex}" end="${pageView.pageIndex.endindex}">
		<c:choose>
			<c:when test="${pageIndex eq pageView.currentPage}">
				<a href="${path}/${param.urladdr}?pageView.currentPage=${pageIndex}${param.urlparams}"><font color=red>${pageIndex}</font></a>
			</c:when>
			<c:otherwise>
				<a href="${path}/${param.urladdr}?pageView.currentPage=${pageIndex}${param.urlparams}">${pageIndex}</a>
			</c:otherwise>
		</c:choose>
	</c:forEach>
</span>

<c:choose>
	<c:when test="${pageView.currentPage eq pageView.totalPage}">
		<a title="下一页" class="pageNextDisable" id="pageNext" href="javascript:;"></a>
		<a title="末页" class="pageLastDisable" id="pageLastDisable" href="javascript:;"></a>
	</c:when>
	<c:otherwise>
		<a title="下一页" class="pageNext" id="pageNext" href="${path}/${param.urladdr}?pageView.currentPage=${pageView.currentPage<pageView.totalPage?pageView.currentPage+1:pageView.totalPage}"></a>
		<a title="末页" class="pageLast" id="pageLast" href="${path}/${param.urladdr}?pageView.currentPage=${pageView.totalPage}"></a>
	</c:otherwise>
</c:choose>
	
	
	转到 第 <input type="text" style="text-align:center;" id="page_no" name="page_no" class="SmallInput" size="3"> 页 
	<a title="转到" class="pageGoto" id="pageGoto" href="javascript:goto_page();">&nbsp;</a>
</div>
<script type="text/javascript">
	function goto_page() {
		if(${empty pageView.totalPage?0:pageView.totalPage} >= $("#page_no").val()) {
			if('${param.urladdr}' != '') {
				window.location.href="${path}/${param.urladdr}?pageView.currentPage="+$("#page_no").val() ;
			}
		} else {
			alert("输入的页码超出范围！") ;
		}
	}
</script>

